using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace WMVConvert.Metadata
{
	/// <summary>
	/// The IWMMetadataEditor interface is used to edit metadata information in ASF file headers. 
	/// It is obtained by calling the WMCreateEditor function.
	/// </summary>
	[ComImport]
	[Guid("96406BD9-2B2B-11d3-B36B-00C04F6108FF")]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	internal interface IWMMetadataEditor2
	{
		/// <summary>The Open method opens an ASF file.</summary>
		/// <param name="pwszFilename">Pointer to a wide-character null-terminated string containing the file name.</param>
		int Open([In, MarshalAs(UnmanagedType.LPWStr)] string pwszFilename);
		/// <summary>The Close method closes the open file without saving any changes.</summary>
		int Close();
		/// <summary>The Flush method closes the open file, saving any changes.</summary>
		int Flush();
		/// <summary>
		/// The OpenEx method opens a file for use by the metadata editor object. OpenEx opens ASF files and MP3 files, though the metadata editor has limited capabilities when working with MP3 files.
		/// </summary>
		/// <param name="pwszFilename">Pointer to a wide-character null-terminated string containing the file name.</param>
		/// <param name="dwDesiredAccess">DWORD containing the desired access type.</param>
		/// <param name="dwShareMode">DWORD containing the sharing mode.</param>
		int OpenEx([In, MarshalAs(UnmanagedType.LPWStr)] string pwszFilename, uint dwDesiredAccess, uint dwShareMode);
	}
}
